package com.company.modules.project.entity;

import java.io.Serializable;
import java.util.Date;

/**
 * 员工
 * @TableName employee
 */
public class Employee implements Serializable {
    /**
     * 员工ID标识
     */
    private Integer id;

    /**
     * 所属部门ID
     */
    private Integer departmentId;

    /**
     * 所属公司ID
     */
    private Integer companyId;

    /**
     * 员工姓名
     */
    private String name;

    /**
     * 员工手机号
     */
    private String phone;

    /**
     * 员工邮箱;新员工的邮箱生成规则：word_number+@company.com
     */
    private String mail;

    /**
     * 员工工号;随机六位数字，用于标识在企业内的唯一用户
     */
    private String workNumber;

    /**
     * 头像路径;头像路径，用于登录之后的显示
     */
    private String avatarUrl;

    /**
     * 工作城市
     */
    private String workCity;

    /**
     * 聘用形式;聘用形式，1表示正式员工，2表示实习员工
     */
    private Integer employForm;

    /**
     * 启用状态;启用状态，1表示启用，2表示禁用
     */
    private Integer enableStatus;

    /**
     * 入职时间
     */
    private Date entryTime;

    /**
     * 离职时间;在职状态为3的时候需要启用
     */
    private Date quitTime;

    /**
     * 权限状态;权限状态，1表示普通员工，2表示部门管理员，3表示公司管理员
     */
    private Integer authorStatus;

    /**
     * 在职状态;在职状态，1表示在职，2表示待入职，3表示离职
     */
    private Integer serviceStatus;

    private static final long serialVersionUID = 1L;

    /**
     * 员工ID标识
     */
    public Integer getId() {
        return id;
    }

    /**
     * 员工ID标识
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * 所属部门ID
     */
    public Integer getDepartmentId() {
        return departmentId;
    }

    /**
     * 所属部门ID
     */
    public void setDepartmentId(Integer departmentId) {
        this.departmentId = departmentId;
    }

    /**
     * 所属公司ID
     */
    public Integer getCompanyId() {
        return companyId;
    }

    /**
     * 所属公司ID
     */
    public void setCompanyId(Integer companyId) {
        this.companyId = companyId;
    }

    /**
     * 员工姓名
     */
    public String getName() {
        return name;
    }

    /**
     * 员工姓名
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * 员工手机号
     */
    public String getPhone() {
        return phone;
    }

    /**
     * 员工手机号
     */
    public void setPhone(String phone) {
        this.phone = phone;
    }

    /**
     * 员工邮箱;新员工的邮箱生成规则：word_number+@company.com
     */
    public String getMail() {
        return mail;
    }

    /**
     * 员工邮箱;新员工的邮箱生成规则：word_number+@company.com
     */
    public void setMail(String mail) {
        this.mail = mail;
    }

    /**
     * 员工工号;随机六位数字，用于标识在企业内的唯一用户
     */
    public String getWorkNumber() {
        return workNumber;
    }

    /**
     * 员工工号;随机六位数字，用于标识在企业内的唯一用户
     */
    public void setWorkNumber(String workNumber) {
        this.workNumber = workNumber;
    }

    /**
     * 头像路径;头像路径，用于登录之后的显示
     */
    public String getAvatarUrl() {
        return avatarUrl;
    }

    /**
     * 头像路径;头像路径，用于登录之后的显示
     */
    public void setAvatarUrl(String avatarUrl) {
        this.avatarUrl = avatarUrl;
    }

    /**
     * 工作城市
     */
    public String getWorkCity() {
        return workCity;
    }

    /**
     * 工作城市
     */
    public void setWorkCity(String workCity) {
        this.workCity = workCity;
    }

    /**
     * 聘用形式;聘用形式，1表示正式员工，2表示实习员工
     */
    public Integer getEmployForm() {
        return employForm;
    }

    /**
     * 聘用形式;聘用形式，1表示正式员工，2表示实习员工
     */
    public void setEmployForm(Integer employForm) {
        this.employForm = employForm;
    }

    /**
     * 启用状态;启用状态，1表示启用，2表示禁用
     */
    public Integer getEnableStatus() {
        return enableStatus;
    }

    /**
     * 启用状态;启用状态，1表示启用，2表示禁用
     */
    public void setEnableStatus(Integer enableStatus) {
        this.enableStatus = enableStatus;
    }

    /**
     * 入职时间
     */
    public Date getEntryTime() {
        return entryTime;
    }

    /**
     * 入职时间
     */
    public void setEntryTime(Date entryTime) {
        this.entryTime = entryTime;
    }

    /**
     * 离职时间;在职状态为3的时候需要启用
     */
    public Date getQuitTime() {
        return quitTime;
    }

    /**
     * 离职时间;在职状态为3的时候需要启用
     */
    public void setQuitTime(Date quitTime) {
        this.quitTime = quitTime;
    }

    /**
     * 权限状态;权限状态，1表示普通员工，2表示部门管理员，3表示公司管理员
     */
    public Integer getAuthorStatus() {
        return authorStatus;
    }

    /**
     * 权限状态;权限状态，1表示普通员工，2表示部门管理员，3表示公司管理员
     */
    public void setAuthorStatus(Integer authorStatus) {
        this.authorStatus = authorStatus;
    }

    /**
     * 在职状态;在职状态，1表示在职，2表示待入职，3表示离职
     */
    public Integer getServiceStatus() {
        return serviceStatus;
    }

    /**
     * 在职状态;在职状态，1表示在职，2表示待入职，3表示离职
     */
    public void setServiceStatus(Integer serviceStatus) {
        this.serviceStatus = serviceStatus;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Employee other = (Employee) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getDepartmentId() == null ? other.getDepartmentId() == null : this.getDepartmentId().equals(other.getDepartmentId()))
            && (this.getCompanyId() == null ? other.getCompanyId() == null : this.getCompanyId().equals(other.getCompanyId()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getPhone() == null ? other.getPhone() == null : this.getPhone().equals(other.getPhone()))
            && (this.getMail() == null ? other.getMail() == null : this.getMail().equals(other.getMail()))
            && (this.getWorkNumber() == null ? other.getWorkNumber() == null : this.getWorkNumber().equals(other.getWorkNumber()))
            && (this.getAvatarUrl() == null ? other.getAvatarUrl() == null : this.getAvatarUrl().equals(other.getAvatarUrl()))
            && (this.getWorkCity() == null ? other.getWorkCity() == null : this.getWorkCity().equals(other.getWorkCity()))
            && (this.getEmployForm() == null ? other.getEmployForm() == null : this.getEmployForm().equals(other.getEmployForm()))
            && (this.getEnableStatus() == null ? other.getEnableStatus() == null : this.getEnableStatus().equals(other.getEnableStatus()))
            && (this.getEntryTime() == null ? other.getEntryTime() == null : this.getEntryTime().equals(other.getEntryTime()))
            && (this.getQuitTime() == null ? other.getQuitTime() == null : this.getQuitTime().equals(other.getQuitTime()))
            && (this.getAuthorStatus() == null ? other.getAuthorStatus() == null : this.getAuthorStatus().equals(other.getAuthorStatus()))
            && (this.getServiceStatus() == null ? other.getServiceStatus() == null : this.getServiceStatus().equals(other.getServiceStatus()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getDepartmentId() == null) ? 0 : getDepartmentId().hashCode());
        result = prime * result + ((getCompanyId() == null) ? 0 : getCompanyId().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getPhone() == null) ? 0 : getPhone().hashCode());
        result = prime * result + ((getMail() == null) ? 0 : getMail().hashCode());
        result = prime * result + ((getWorkNumber() == null) ? 0 : getWorkNumber().hashCode());
        result = prime * result + ((getAvatarUrl() == null) ? 0 : getAvatarUrl().hashCode());
        result = prime * result + ((getWorkCity() == null) ? 0 : getWorkCity().hashCode());
        result = prime * result + ((getEmployForm() == null) ? 0 : getEmployForm().hashCode());
        result = prime * result + ((getEnableStatus() == null) ? 0 : getEnableStatus().hashCode());
        result = prime * result + ((getEntryTime() == null) ? 0 : getEntryTime().hashCode());
        result = prime * result + ((getQuitTime() == null) ? 0 : getQuitTime().hashCode());
        result = prime * result + ((getAuthorStatus() == null) ? 0 : getAuthorStatus().hashCode());
        result = prime * result + ((getServiceStatus() == null) ? 0 : getServiceStatus().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", departmentId=").append(departmentId);
        sb.append(", companyId=").append(companyId);
        sb.append(", name=").append(name);
        sb.append(", phone=").append(phone);
        sb.append(", mail=").append(mail);
        sb.append(", workNumber=").append(workNumber);
        sb.append(", avatarUrl=").append(avatarUrl);
        sb.append(", workCity=").append(workCity);
        sb.append(", employForm=").append(employForm);
        sb.append(", enableStatus=").append(enableStatus);
        sb.append(", entryTime=").append(entryTime);
        sb.append(", quitTime=").append(quitTime);
        sb.append(", authorStatus=").append(authorStatus);
        sb.append(", serviceStatus=").append(serviceStatus);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}
